package com.ktjy.service.impl;

import com.ktjy.entity.StorageRecord;
import com.ktjy.mapper.StorageRecordMapper;
import com.ktjy.service.StorageRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("storageRecordService")
public class StorageRecordServiceImpl implements StorageRecordService {

    @Autowired
    StorageRecordMapper storageRecordMapper;

    @Override
    @Transactional
    public int insert(StorageRecord storageRecords) {
        return storageRecordMapper.insert(storageRecords);
    }

    @Override
    @Transactional
    public int deleteById(Long id) {
        return storageRecordMapper.deleteById(id);
    }

    @Override
    @Transactional
    public int updateById(StorageRecord storageRecord) {
        return storageRecordMapper.updateById(storageRecord);
    }
}
